/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"4B7C911E-D4B2-41FD-9FE1-3AAFB5EFD59C"}
 */
function onShow(firstShow, event) 
{
	databaseManager.setAutoSave(false);
}

/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"196151CC-13F8-42E4-B2BE-959F7FACA21E"}
 */
function onDataChange_unidad(oldValue, newValue, event) 
{
	if(unidad==null && unidad==0)
	{
		globals.gMensaje ='Debe informar unidad '
		globals.DIALOGS.showInfoDialog('Productos',  globals.gMensaje,  "OK") // 23/01/2014
	}
	return true
}

/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"4796812F-1AE1-4E49-AAF9-04D90673B314"}
 */
function onDataChange_cod_producto(oldValue, newValue, event) 
{
	if (globals.gEstadoAbm != 1)
		return false;
	else
		return true;
		
}
